package com.cskaoyan.wx.utils;

import com.cskaoyan.wx.vo.HandleOptionBean;


import java.util.ArrayList;
import java.util.List;

/**
 * @description:
 * @author: libugu@cskaoyan.com
 * @date 2021/4/12 - 15:25
 */

public class OptionUtils {

    public static HandleOptionBean handleOptionBean(Integer status) {

        HandleOptionBean handleOptionBean = new HandleOptionBean();
        if (status == 101) {

            handleOptionBean.setCancel(false);
            handleOptionBean.setDelete(true);
            handleOptionBean.setPay(true);
            handleOptionBean.setComment(false);
            handleOptionBean.setConfirm(false);
            handleOptionBean.setRefund(false);
            handleOptionBean.setRebuy(false);

            return handleOptionBean;
        } else if (status == 102 || status == 103) {
            handleOptionBean.setCancel(false);
            handleOptionBean.setDelete(true);
            handleOptionBean.setPay(false);
            handleOptionBean.setComment(false);
            handleOptionBean.setConfirm(false);
            handleOptionBean.setRefund(false);
            handleOptionBean.setRebuy(false);

            return handleOptionBean;
        } else if (status == 201) {
            return null;
        } else if (status == 301 || status == 401 || status == 402)

            handleOptionBean.setCancel(false);
        handleOptionBean.setDelete(true);
        handleOptionBean.setPay(false);
        handleOptionBean.setComment(false);
        handleOptionBean.setConfirm(false);
        handleOptionBean.setRefund(false);
        handleOptionBean.setRebuy(true);

        return handleOptionBean;
    }
}
